<template>
  <div class="swiper">
    <div class="swiper-container">
      <el-carousel :interval="4000" type="card" height="280px">
        <el-carousel-item v-for="(item, index) in swiperList" :key="index">
          <img :src="item.picImg" alt=""/>
        </el-carousel-item>
      </el-carousel>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import { swiperList as swiperListData } from '@/assets/data/swiper.js';

const swiperList = ref([]);

onMounted(() => {
  swiperList.value = swiperListData;
});
</script>

<style scoped>
@import "@/assets/css/index/swiper.scss";
</style>
